package com.baizhi.common.exception;

import com.baizhi.common.result.ResponseEnum;
import lombok.extern.slf4j.Slf4j;

/**
 * @author LZM
 * @version 1.0
 * @Date 2021/12/22
 * @Description 自定义断言
 */
@Slf4j
public class Assert {

    /**
     * 断言对象不为空，为空则抛异常
     * @param object
     * @param responseEnum
     */
    public static void notNull(Object object, ResponseEnum responseEnum) {
        if (object == null) {
            log.info("obj is null.........");
            throw new BusinessException(responseEnum);
        }
    }



}
